Barakus_Core_View = Class.extend({
	init: function()
	{
		this.template = null;
		
		this.core = TrimPath;
		
		this.noShow = false;
		
		this.assigns = {};
	},
	load: function(viewPath)
	{
		this.template = viewPath;
	},
	setController: function()
	{
	},
	assign: function(name, value)
	{			
		var toEval = 'this.assigns.' + name + ' = value;';
		
		eval(toEval);
	},
	show: function()
	{
		if (!this.noShow)
		{
			var parsedTemplate = this.core.parseTemplate(BARAKUS.io.fileGetContents(WEB_PATH + 'view/' + this.template));
			
			var data = this.assigns;
			
			BARAKUS.write(parsedTemplate.process(data));
		}
	},
	url: function(url)
	{
		return BARAKUS.rawRequest.uri(url);
	}
});